<?php
/**
 * Created by PhpStorm.
 * User: chengchaogui
 * Date: 2017/8/15
 * Time: 22:50
 */

namespace App\Framework\Enum;


class ProductStatusEnum
{
    const PUTAWAY = 1;
    const SOLD_OUT = 2;

    public static $dataMap = [
        self::PUTAWAY => '上架',
        self::SOLD_OUT => '下架'
    ];

    public static function getName($key)
    {
        if (array_key_exists($key, self::$dataMap)) {
            return self::$dataMap[$key];
        }

        return '';
    }
}